<wicket:head>

<link rel="stylesheet" type="text/css" href="css/analysis-layout.css" /> 	
<link rel="stylesheet" type="text/css" href="css/analysis-content.css" />


<script type="text/javascript"> 
  function insertAtCursor(myField,myValue)   {   
	myValue = ' ' + myValue +' ';
  	if (document.selection)   {   
  		myField.focus();   
  		sel =   document.selection.createRange();   
  		sel.text = myValue;   
  	}   
  	else if (myField.selectionStart||   myField.selectionStart   ==   "0")   {   
  		var   startPos   =   myField.selectionStart;   
  		var   endPos   =   myField.selectionEnd;   
  		myField.value   =   myField.value.substring(0,   startPos)  +   myValue  +   myField.value.substring(endPos,   myField.value.length);   
  	}   else   {   
  		myField.value   +=   myValue;   
  	}   
  }   

  
   
  //calling   the   function   
  //insertAtCursor(document.formName.fieldName,   'this   value');   
    
  </script>

</wicket:head>

<wicket:panel>  




<form wicket:id="form">

 <div wicket:id="MessageBoxInPanel"></div>

<div id="mainbox" class="classic">

    <div id="left" class="classic"><!-- table tree list -->
        <table class="imxt-head" width="100%" height="100%">
            <tr class="imxt-columns" height="38px">
                <th>所有表</th>
            </tr>
			<tr class="imxt-columns">    		
    			<td colspan="2" style="text-align:top;vertical-align:top" ><div wicket:id ="tablesTree" class="classic" ></div></td>
    		</tr>
            <tr class="imxt-columns">
                <th></th>
            </tr>
        </table>
    </div>

    <div id="right" class="classic">

	   <div id="top1" class="classic">
	       <table class="imxt-head" width="100%" height="100%">
	         <tr class="imxt-columns">
	           <th>名称 </th>
	           <td><input type="text" wicket:id="txtName" value="v"></td>
	           <th>描述</th>
	           <td><input type="text" wicket:id="txtDesc" value="v"></td>
	           <th><a wicket:id="linkSaveQuery" href="#">保存</a></th>
	           <th><a wicket:id="linkCancelQuery" href="#">返回</a></th>
	           <th><a wicket:id="linkExecQuery" href="#">执行</a></th>
	         </tr>
	       </table>
	   </div><!--end top1 -->


	    <div id="top2"><!-- selected table and field list --> 
	        <div wicket:id="panelForSelectedTables" class="classic">
	            <div wicket:id="listSelectedTables"  class="divtable" >
	                <table class="imxt-body" width="220px">
	                    <tr class="imxt-columns">
	                        <th colspan="3"><span wicket:id="lblSelectedTableName">表名</span></th>
	                        <td><a wicket:id="linkDeleteSelectedTable" href="#">[X]</a></td>
	                    </tr>
	                    <tr class="imxt-columns">
	                        <th>显示?</th>
	                        <th>条件?</th>
	                        <th>排序?</th>
	                        <th>字段名</th>
	                    </tr>
	
	                    <tr wicket:id="listSelectedTableFields" class="imxt-columns"><!-- fields -->
	                        <td><input type="checkbox" wicket:id="chkDisplay" /></td>
	                        <td><a wicket:id="linkAddWhereField" href="#">添加</a></td>
	                        <td><input type="checkbox" wicket:id="chkOrder" /></td>
	                        <td><span wicket:id="lblFieldName"></span></td>
	                    </tr>
	                </table>
	            </div>
	        </div>
	    </div><!-- end top -->


		<div id="where"><!-- where conditions -->
		  <div wicket:id="panelTab">		
				<div id="tabnav"><!-- tabs  -->
					<ul>
			    		<li><a wicket:id="linkShowPanelWF" href="#">条件字段</a></li>
			    		<li><a wicket:id="linkShowPanelDF" href="#">显示字段</a></li>
			    		<li><a wicket:id="linkShowPanelOF" href="#">排序字段</a></li>
			    		<li><a wicket:id="linkShowPanelRS" href="#">查询结果</a></li>    		
					</ul>
				</div><!-- end tabs -->


				<div wicket:id="panelWhereField" class="classic"><!-- 条件字段 -->		
					<table class="imxt-body" width="100%">
			    		<tr class="imxt-columns">
			        		<th colspan="9">添加的条件</th>
			    		</tr>
			    		<tr class="imxt-columns">
			        		<th>条件名</th>
			        		<th>表名</th>
			        		<th>字段名</th>
			        		<th>逻辑符号</th>
			        		<th>值</th>
			        		<th colspan="4">操作</th>
			    		</tr>
			    		<tr wicket:id="listWhereFields" class="imxt-columns">
			        		<td><span wicket:id="lblWFAlias">条件名称</span></td>
			        		<td><span wicket:id="lblWFTableName">表名</span></td>
			        		<td><span wicket:id="lblWFFieldName">字段名</span></td>
			        		<td><select wicket:id="opsign">逻辑符号</select></td>
			        		<td><input type="text" wicket:id="entervalue" /> 
			        			<input type="text" wicket:id="selectvalue" /></td>
			        		<td><a wicket:id="linkSelectValue" href="#">选择</a></td>
			        		<td><a wicket:id="moveUpWF" href="#">上移</a></td>
			        		<td><a wicket:id="moveDownWF" href="#">下移</a></td>
			        		<td><a wicket:id="linkDelWhereField" href="#">删除</a></td>
			    		</tr>
					</table>
				</div>
 
				<div wicket:id="panelDisplayField" class="classic"><!-- 显示字段 -->
					<table class="imxt-body" width="100%">
			    		<tr class="imxt-columns">
			        		<th colspan="6">显示的字段</th>
			    		</tr>
			    		<tr class="imxt-columns">
			        		<th>表名</th>
			        		<th>字段名</th>
			        		<th>函数符号</th>
			        		<th colspan="3">操作</th>
			    		</tr>
			    		<tr wicket:id="listDisplayFields" class="imxt-columns">
			        		<td><span wicket:id="lblDFTableName">表名</span></td>
			        		<td><span wicket:id="lblDFFieldName">字段名称</span></td>
			        		<td><select wicket:id="ddl_funcsign">函数符号</select></td>
			        		<td><a wicket:id="moveUpDF" href="#">上移</a></td>
			        		<td><a wicket:id="moveDownDF" href="#">下移</a></td>
			        		<td><a wicket:id="linkDelDisplayField" href="#">删除</a></td>
			    		</tr>
					</table>
				</div> 

				<div wicket:id="panelOrderField" class="classic"><!-- sort fields -->
					<table class="imxt-body" width="100%">
			    		<tr class="imxt-columns">
			        		<th colspan="6">排序字段</th>
			    		</tr>
			    		<tr class="imxt-columns">
			        		<th>表名</th>
			        		<th>字段名</th>
			        		<th colspan="4">操作</th>
			    		</tr>
			    		<tr wicket:id="listOrderFields" class="imxt-columns">
			        		<td><span wicket:id="lblOFTableName">表名</span></td>
			        		<td><span wicket:id="lblOFFieldName">字段名称</span></td>
			        		<td><select wicket:id="orderSign">排序符号 </select></td>
			        		<td><a wicket:id="moveUpOF" href="#">上移</a></td>
			        		<td><a wicket:id="moveDownOF" href="#">下移</a></td>
			        		<td><a wicket:id="linkDelOrderField" href="#">删除</a></td>
			    		</tr>
					</table>
				</div>

				<div wicket:id="panelResult"><!-- 查询结果 -->
		            <table class="imxt-head"  width="100%">
		            	<tr class="imxt-columns">
		            		<th>查询结果</th>
		            	</tr>
		            	<tr>
		            		<td>	
		            			<fieldset>
		                		<span wicket:id="templatePanel">Template output will be put here</span>
		            			</fieldset>
		            		</td>
		            	</tr>
		            	<tr>
		            		<td>
		            		    <table class="imxt-head" height="100%"  width="310px">
		            		     	<tr class="imxt-columns">
		 								<th><span wicket:id="lblPageCount"></span></th>           		
		            					<th><a wicket:id="linkPageFirst" href="#">首页</a></th>
		    							<th><a wicket:id="linkPagePrevious" href="#">上一页</a></th>
		    							<th><a wicket:id="linkPageNext" href="#">下一页</a></th>
		    							<th><a wicket:id="linkPageEnd" href="#">末页</a></th>
		    						</tr>
		    					</table>
		            		</td>
		            	</tr>
		            </table>
			            
				</div>
	
			</div>
		</div>

		<!-- end where -->
 
		<div id="bottom"><!-- modify conditions --> 
		    <div class="classic"><a wicket:id="linkOpenEdit" href="#">编辑条件关系</a></div>		
			<div wicket:id="panelEditCondition" class="classic">
							<table class="imxt-body" width="100%">
	  							<tr class="imxt-columns">
				  					<td><a wicket:id="linkLeft" href="#">【左括号】</a></td>
				  					<td><a wicket:id="linkRight" href="#">【右括号】</a></td>
				  					<td><a wicket:id="linkAnd" href="#">【AND】</a></td>
				  					<td><a wicket:id="linkOr" href="#">【OR】</a></td>
				  					<td><a wicket:id="linkEnter" href="#">【换行】</a></td>
				  					<td><a wicket:id="linkClear" href="#">清空</a></td>
				  					<td><a wicket:id="linkRebuild" href="#">重建</a></td>
				  					<td><a wicket:id="linkCloseEdit" href="#">隐藏</a></td>
				  				</tr>
		  						<tr>
		  							<td colspan="8">
		  								<textarea id=demo1 wicket:id="textarea" cols="102" rows="3"></textarea>
		  							</td>
		  						</tr>
		  					</table>
	  		</div>
		</div>


</div>

</div>

</form>

 <div>
  <span wicket:id="feedback">feedbackmessages will be put here</span><br/>
 </div>

<div wicket:id="modalwindow"></div>

</wicket:panel>

